<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateUserInfo extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('user_info', function (Blueprint $table) {
            $table->integerIncrements('id');
            $table->unsignedInteger('user_id')->default(0)->comment('用户ID');
            $table->string('contact', 32)->default('')->comment('联系方式（手机号码）');
            $table->unsignedTinyInteger('sex')->default(0)->comment('性别：0保密，1男，2女');
            $table->unsignedInteger('qq')->nullable()->comment('qq号码');
            $table->string('description', 60)->default('')->comment('个性签名');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('user_info');
    }
}
